#define DEBUG
#include <cstdio>

using namespace std;

const int maxn=5000, maxm=5000;

void solve(int x, int y, int n, int m, char ans[maxn+1][maxm+1]) {
  static char now[maxn+1][maxm+1];
  static int cnt=-1;
  if (x<=n && y<=m) {
    now[x][y] = '(';
    solve(y==m ? x+1 : x, y==m ? 1 : y+1, n, m, ans);
    now[x][y] = ')';
    solve(y==m ? x+1 : x, y==m ? 1 : y+1, n, m, ans);
  } else {
    int nowcnt=0, sum;
    for (int i=1; i<=n; i++) {
      sum = 0;
      for (int j=1; j<=m; j++) {
	sum += now[i][j]=='(' ? 1 : -1;
	if (sum<0) {
	  break;
	}
      }
      nowcnt += sum==0;
    }
    for (int j=1; j<=m; j++) {
      sum = 0;
      for (int i=1; i<=n; i++) {
	sum += now[i][j]=='(' ? 1 : -1;
	if (sum<0) {
	  break;
	}
      }
      nowcnt += sum==0;
    }

    if (nowcnt>cnt) {
      cnt = nowcnt;
      for (int i=1; i<=n; i++) {
	for (int j=1; j<=m; j++) {
	  ans[i][j] = now[i][j];
	}
      }
    }
  }
}

int main() {
  freopen("butterfly.in", "r", stdin);
  freopen("butterfly.checker.out", "w", stdout);

  int n, m;
  scanf("%d %d", &n, &m);

  static char ans[maxn+1][maxm+1];
  solve(1, 1, n, m, ans);

  for (int i=1; i<=n; i++) {
    for (int j=1; j<=m; j++) {
      printf("%c", ans[i][j]);
    }
    printf("\n");
  }

  fclose(stdin);
  fclose(stdout);
  return 0;
}
